package com.frxuexi.visit.view

import android.os.Bundle
import com.google.android.material.snackbar.Snackbar
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupActionBarWithNavController
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.blankj.utilcode.util.ToastUtils
import com.frxuexi.lib_base.mvvm.BaseActivity
import com.frxuexi.visit.R
import com.frxuexi.visit.VisitViewModel
import com.frxuexi.visit.databinding.ActivityVisitDetailBinding
import dagger.hilt.android.AndroidEntryPoint

@Route(path = "/visit/VisitDetailActivity")
@AndroidEntryPoint
class VisitDetailActivity : BaseActivity<ActivityVisitDetailBinding,VisitViewModel>() {
    @Autowired
    lateinit var vid:String
    override fun initData() {
        vm.visitsByIdData.observe(this){
            binding.bean=it
        }
    }

    override fun initView() {
        ARouter.getInstance().inject(this)
        ToastUtils.showLong(vid)
        vm.getVisitById(vid.toInt())
    }

}